home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- set -e
-
- # Remove shutdown and reboot links; this init script does not need them.
- if dpkg --compare-versions "$2" lt "1.0.4-5ubuntu2"; then
- rm -f /etc/rc0.d/K21acpid /etc/rc6.d/K21acpid
- fi
-
- HAL_NEEDS_RESTARTING=no
- case "$1" in
- configure|reconfigure)
- #
- if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ -f /var/run/hald/hald.pid ]; then
- HAL_NEEDS_RESTARTING=yes
- invoke-rc.d hal stop
- fi
- ;;
- esac
-
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/acpid" ]; then
- update-rc.d acpid start 10 2 3 4 5 . stop 21 1 . >/dev/null
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d acpid start || exit $?
- else
- /etc/init.d/acpid start || exit $?
- fi
- fi
- # End automatically added section
-
-
- case "$1" in
- configure|reconfigure)
- if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ "$HAL_NEEDS_RESTARTING" = "yes" ]; then
- invoke-rc.d hal start
- fi
- ;;
- esac
-